package org.zcl.service.game.impl;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.zcl.service.game.AbstractGameService;
import org.zcl.service.game.enums.CityEnum;
import org.zcl.service.game.model.YaHaiXuanCity;

/**
 * @author zhuchenglin
 * @since 2023/12/14 17:48
 */
@Service
public class AkServiceImpl extends AbstractGameService<YaHaiXuanCity> {

    protected AkServiceImpl() {
        super(CityEnum.YA_HAI);
    }

    @Override
    protected boolean play(YaHaiXuanCity convert) {
        String name = convert.getName();
        return StringUtils.equals(name, CityEnum.YA_HAI.getMsg());
    }

    @Override
    public YaHaiXuanCity map(String r) {
        return new YaHaiXuanCity(r);
    }
}
